package com.zhuss.core.processor;

import com.zhuss.bean.vo.core.version.VersionVo;
import com.zhuss.core.db.dao.ext.VersionDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * 查询公司 processorv
 * @Author: zhushanshuo
 * @Date: 2019/9/24 19:54
 */
@Component("versionRead")
public class VersionRead {
	
	@Autowired
	private VersionDao versionDao;

	/**
	 * 公司 
	 * @return
	 */
	public Object compare(Float version) {
		Boolean b = new Boolean(true);
		VersionVo compare = versionDao.compare(version);
		Float versionNo = compare.getVersion();
		//如果app版本号(version)比服务器设置的版本号(versionNo)低就为true更新
		if ((int)(version*100) < (int)(versionNo*100)){
			b = true;//true表示更新
		}else {
			b = false;//false表示不更新
		}
		return b;
	}

}
